
<div class="box box-solid">
	<div class="box-header with-border">
		<h3 class="box-title">更多设置</h3>

		<div class="box-tools">
			<button type="button" class="btn btn-box-tool" data-widget="collapse">
				<i class="fa fa-minus"></i>
			</button>
		</div>
	</div>
	<!-- /.box-header -->
	<div class="box-body no-padding">
		<!-- Custom Tabs -->
		<div class="nav-tabs-custom">
			<ul class="nav nav-tabs">
				<li class="active">
					<a href="#tab_spec" data-toggle="tab">商品规格/库存/价格</a>
				</li>
				<li>
					<a href="#tab_1" data-toggle="tab">常用</a>
				</li>
				<li>
					<a href="#tab_seo" data-toggle="tab">SEO</a>
				</li>
				<#if module.styles ??>
				<li>
					<a href="#tab_style" data-toggle="tab">样式</a>
				</li>
				</#if>
				<li>
					<a href="#tab_position" data-toggle="tab">位置</a>
				</li>
				<li>
					<a href="#tab_remarks" data-toggle="tab">备注</a>
				</li>
				<li>
					<a href="#tab_metadata" data-toggle="tab">元数据</a>
				</li>

			</ul>
			<div class="tab-content">
				<div class="tab-pane active form-horizontal" id="tab_spec">
					<div class="form-group">
						<label class="col-sm-1 control-label">宣传价格</label>
						<div class="col-sm-11">
							<input type="text" class="form-control" name="content.price"  value="${(content.price)!0}" onkeyup="this.value=this.value.replace(/[^0-9^/.]/g, '')">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">规格</label>
						<div class="col-sm-11">
							<table id="specTable" class="table table-hover" style="word-break:break-all">
								<tbody>
									<#if specList??>
										<tr>
											<td>
												<#list specList as bean>
													<span style="margin: 5px;">
														<input class="specClass" <#if content??>${CONTENTSPEC_CHECKED(content.id!, bean.id!)!}</#if> name="specId" type="checkbox" value="${(bean.id)!}">${(bean.title)!}
													</span>
												</#list>
											</td>
										</tr>
									</#if>
								</tbody>
							</table>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">规格值</label>
						<div class="col-sm-11">
							<table id="specValueTable" class="table table-hover" style="word-break:break-all">
								<tbody>
									<#if specValueList??>
										<tr id="specValueTr${(spec.id)!}">
											<td>
												${(spec.title)!}
											</td>
											<td>
												<#list specValueList as bean>
														<span style="margin: 5px;">
															<input class="specValueClass" ${CONTENTSPECVALUE_CHECKED(content.id!, spec.id!, bean.id!)!} name="specValueIds" type="checkbox" value="${(bean.id)!}">${(bean.value)!}
														</span>
												</#list>
											</td>
										</tr>
									</#if>
								</tbody>
							</table>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">库存/价格</label>
						<div class="col-sm-11">
							<table id="itemTable" class="table table-hover" style="word-break:break-all">
								<thead>
									<tr>
										<th>规格值</th>
										<th>价格</th>
										<th>库存</th>
									</tr>
								</thead>
								<tbody>
									<#if specValueCheckedList??>
										<#list specValueCheckedList as bean>
											<tr id="itemTr${(bean.id)!}">
												<td>${(bean.value)!}</td>
												<td><input type="input" name="price${(bean.id)!}" value="${bean.getContentSpecItem(content.id!).price!}" ></td>
												<td><input type="input" name="stock${(bean.id)!}" value="${bean.getContentSpecItem(content.id!).stock!}" ></td>
											<tr>
										</#list>
									</#if>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<div class="tab-pane form-horizontal" id="tab_1">
				<div class="form-group">
					<label class="col-sm-1 control-label">排序</label>
					<div class="col-sm-11">
						<input type="text" class="form-control" name="content.order_number" value="${(content.order_number)!'0'}" onkeyup="this.value=this.value.replace(/[^0-9]/g, '').replace(/^0(\d)/g, '$1')||0">
					</div>
				</div>
                <div class="form-group">
                  <label class="col-sm-1 control-label">作者</label>
                  <div class="col-sm-11">
                    <input type="text" class="form-control" name="content.author" value="${(content.author)!}">
                  </div>
                </div>
				<div class="form-group">
					<label for="_flag" class="col-sm-1 control-label">标识</label>
					<div class="col-sm-11">
						<input type="text" class="form-control" name="content.flag" id="_flag"  value="${(content.flag)!}">
					</div>
				</div>
                <div class="form-group">
                  <label class="col-sm-1 control-label">评论</label>
                  <div class="col-sm-11">
	                  <select class="form-control" name="content.comment_status">
	                    <option value="">默认</option> 
	                    <#if (content.comment_status)?? && "open" == content.comment_status >
						<option value="open" selected="selected">开启</option> <#else>
						<option value="open">开启</option> </#if> <#if (content.comment_status)?? && "close" == content.comment_status >
						<option value="close" selected="selected">关闭</option> <#else>
						<option value="close">关闭</option> </#if>
	                  </select>
                  </div>
                </div>
              
				</div>
				<!-- /.tab-pane -->
				<div class="tab-pane " id="tab_seo">
					<div class="form-group ">
						<textarea class="form-control " rows="2" name="content.meta_keywords" placeholder="请输入关键字">${(content.meta_keywords)!}</textarea>
					</div>
					<div class="form-group ">
						<textarea class="form-control" rows="2" name="content.meta_description" placeholder="请输入描述内容">${(content.meta_description)!}</textarea>
					</div>
				</div>
				
				<#if module.styles ??>
				<div class="tab-pane" id="tab_style">
					<div class="form-group">
	                  <div class="radio">
	                    <label>
	                      <#if (content.style) ??>
	                      <input type="radio" name="content.style"  value="" >
	                      <#else>
	                      <input type="radio" name="content.style"  value="" checked="checked">
	                      </#if>
	                      样式:默认
	                    </label>
	                  </div>
	                  <#list module.styles! as style >
	                  <#if (content.style)?? && content.style == style>
		                  <div class="radio">
		                    <label>
		                      <input type="radio" name="content.style"  value="${style}" checked="checked">
		                      样式：${style}
		                    </label>
		                  </div>
	                  <#else>
	                  	 <div class="radio">
		                    <label>
		                      <input type="radio" name="content.style"  value="${style}">
		                      样式：${style}
		                    </label>
		                  </div>
	                  </#if>
	                  </#list>
					</div>
				</div>
				</#if>
				
				<div class="tab-pane form-horizontal" id="tab_position">
					
	               <div class="form-group">
	                 <label for="_lng" class="col-sm-1 control-label">经度</label>
	
	                 <div class="col-sm-11">
	                   <input type="text" class="form-control" id="_lng" name="content.lng" value="${(content.lng)!}">
	                 </div>
	               </div>
	               <div class="form-group">
	                 <label for="_lat" class="col-sm-1 control-label">纬度</label>
	                 <div class="col-sm-11">
	                   <input type="text" class="form-control" id="_lat" name="content.lat" value="${(content.lat)!}">
	                 </div>
	               </div>
				</div>
				
				<div class="tab-pane " id="tab_remarks">
					<div class="form-group">
						<textarea class="form-control" rows="3" name="content.remarks" placeholder="请输入备注信息">${(content.remarks)!}</textarea>
					</div>
				</div>
				
				
				<div class="tab-pane form-horizontal" id="tab_metadata">
				
				<#list module.metadatas as metadata>
					 <div class="form-group">
		                 <label for="meta:${metadata.name!}" class="col-sm-1 control-label" style="width: 10%">${metadata.title!}</label>
		                 <div class="col-sm-11" style="width: 90%">
		                   <input type="text" class="form-control" placeholder="${metadata.placeholder!}" id="meta:${metadata.name!}" name="meta:${metadata.name!}" value="${(content.metadata('content',metadata.name))!}">
		                 </div>
		              </div>
		        <#else>
		         	模板没有元数据定义
				</#list>
				
				</div>
				<!-- /.tab-pane -->
			</div>
			<!-- /.tab-content -->
		</div>
		<!-- nav-tabs-custom -->
	</div>
</div>